﻿using System.Runtime.Serialization;
using System.Collections.Generic;

namespace DataBoundApp1// Replace with your own namespace
{
    
    /// <summary>
    /// Units represents the hard nutrition values, for example Unit could be kCal and value 300
    /// or Unit could be g and value 50.
    /// </summary>
    [DataContract]
    public partial class Units
    {
        [DataMember(Name = "Unit")]
        public string unit;
        
        [DataMember(Name = "Name")]
        public float value;
    }

    
    /// <summary>
    /// NutritiveValues contains units and the name of that nutrition for example Protein or Fat
    /// </summary>
    [DataContract]
    public partial class NutritiveValues
    {
        [DataMember(Name = "Name")]
        public string name;
        
        [DataMember(Name = "Values")]
        public List<Units> values;
    }

    
    /// <summary>
    /// MenuItems are the actual primary ingredients that make up the food, like pork, gravy, potatoes.
    /// </summary>
    [DataContract]
    public partial class MenuItems
    {
        [DataMember(Name = "Name")]
        public string name;
        
        [DataMember(Name = "Ingredients")]
        public string ingredients;
        
        [DataMember(Name = "Diets")]
        public string diets;
        
        [DataMember(Name = "NutritiveValues")]
        public List<NutritiveValues> nutritions;
    }

    
    /// <summary>
    /// This is the container for those actual foods like pasta bolognese etc.
    /// </summary>
    [DataContract]
    public partial class MealOptions
    {
        [DataMember(Name = "MealOptionId")]
        public int mealOptionId;

        [DataMember(Name = "MenuDate")]
        public string menuDate;
        
        [DataMember(Name = "ExternalGroupId")]
        public int externalGroupId;
        
        [DataMember(Name = "Name")]
        public string name;
        
        [DataMember(Name = "MenuItems")]
        public List<MenuItems> menuItems;

    }
    /// <summary>
    /// menuRoot is the highest hierarchy item in Juvenes json serialization.
    /// It doesnt really contain much useful info besides the ones that are already declared.
    /// </summary>
    [DataContract]
    public class menuRoot
    {
        [DataMember(Name = "Name")]
        public string name;

        [DataMember(Name = "AdditionalName")]
        public string additionalName;
        
        [DataMember(Name = "MenuTypeName")]
        public string menuTypeName;
        
        [DataMember(Name = "MenuId")]
        public int menuId;
        
        [DataMember(Name = "MenuTypeId")]
        public int menuTypeId;
        
        [DataMember(Name = "MenuDate")]
        public string menuDate;
        
        [DataMember(Name = "Week")]
        public int week;
        
        [DataMember(Name = "Weekday")]
        public int weekday;
        
        [DataMember(Name = "MealOptions")]
        public List<MealOptions> Meals;
    }
}